#!/usr/bin/python
# -*- coding: UTF-8 -*-

from Scripts.Common import EnumData

#
# converts data content to string content
# @param [excelElementData] the element data in excel
# @return string data
#
def ConvertToString(excelElementData):
    if None == excelElementData:
        return ""
    
    elementType = excelElementData.GetType()
    elementValue = excelElementData.GetValue()

    if EnumData.INT == elementType or EnumData.FLOAT == elementType:
        if None == elementValue:
            return "0"
        else:
            return str(elementValue)
    elif EnumData.STRING == elementType:
        if None == elementValue:
            return "\"\""
        else:
            return "\"" + elementValue + "\""
    else:
        return ""